<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.5.16/dist/vue.js"></script>
</head>
<body>
<div id="app">
<caihappy v-for="item in items" v-bind:cai="item"></caihappy>
</div>
</body>
<script>
    Vue.component('caihappy',{
        template:'<li>{{cai}}</li>',
        props:['cai']
    });
    var vm = new Vue({
        el: "#app",
        data: {
            items:['Java','Linux','前端']
        }
    });
</script>
</html>